package com.example.mybatislearning;

import com.example.mybatislearning.again.MyClass;
import com.example.mybatislearning.again.MyClassAnother;
import com.example.mybatislearning.mymapper.HelloTest;
import com.example.mybatislearning.test.annotation.MyLearningScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@MyLearningScan("com.example.mybatislearning.mymapper")
public class MybatisLearningApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(MybatisLearningApplication.class, args);
        MyClass bean0 = run.getBean(MyClass.class);
        MyClassAnother beanAnother = run.getBean(MyClassAnother.class);
        HelloTest helloTest = run.getBean(HelloTest.class);
        System.out.println(bean0);
        System.out.println(beanAnother);
        System.out.println(helloTest.f1());
    }
}
